﻿using System.Collections.Generic;

namespace AiMoRhino.Main
{
    static class Local
    {
        static readonly int[] chineseIds = new int[]
        {
            2052,
            3076,
            5124,
            4100,
            1028
        };
        //https://wiki.freepascal.org/Language_Codes

        public static bool RunningInChinese = true;// chineseIds.Contains(Rhino.UI.Localization.CurrentLanguageId);

        public static string Get(string key)
        {
            if (RunningInChinese && CN.TryGetValue(key, out string value)) return value;
            return key;
        }
        static readonly Dictionary<string, string> CN = new Dictionary<string, string>()
        {
            {"Scripts run in {0:f3} sec", "代码执行耗时 {0:f3} 秒" },
            {"Cannot load assembly at","无法载入编译代码：" },
            {"RunCommand Exception:","运行命令Exception错误：" },
            {"Cannot run scripts while other command is running","无法在Rhino运行其他命令过程中执行代码" },
            {"User canceled the script running","用户中止了代码运行" },
            {"Info","Info" },
            {"Rhino is runing an aimo scipt > 30 sec without finish, do you want to stop it now? This is the final chance you stop it.","AiMo代码已经运行了 10 秒以上，你想中止吗？这是最后一次中止的机会" },
            {"Rhino is runing an aimo scipt 10 sec without finish, do you want to stop it now?","AiMo代码已经运行了 3 秒以上，你想中止吗？" },
        };
    }
}
